﻿using OneCard.Face8280Module.DeviceModel.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OneCard.Face8280Module.Entities.DTO.Cache
{
    /// <summary>
    /// 用于缓存的门信息
    /// </summary>
    public class DTOCacheDoor
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int EquptID { get; set; }

        /// <summary>
        /// 设备 SN
        /// </summary>
        public string EquptSN { get; set; }  // 是

        /// <summary>
        /// 设备名称
        /// </summary>
        public string EquptName { get; set; }  // 是

        /// <summary>
        /// 出入门类别， 0-入门;1-出门
        /// </summary>
        public int EquptAddr { get; set; }


        /// <summary>
        /// 安装位置ID
        /// </summary>
        public int LctnID { get; set; }  // 是

        /// <summary>
        /// 安装位置
        /// </summary>
        public string LctnName { get; set; }  // 是

        /// <summary>
        /// 同步状态
        /// 0--未同步；1--已同步
        /// </summary>
        public int UploadStatus { get; set; }

        /// <summary>
        /// 同步时间
        /// </summary>
        public DateTime UploadStatusTime { get; set; }


        /// <summary>
        /// 最近保活包时间
        /// </summary>
        public DateTime LastKeepaliveTime { get; set; }  // 是

        /// <summary>
        /// 最近一次请求API时间
        /// </summary>
        public DateTime OnlineTime { get; set; }  // 是


        /// <summary>
        /// 门状态  0--无门磁；1--门开；2--门关
        /// </summary>
        public int DoorStatus { get; set; }


        /// <summary>
        /// 设备报警状态  0--无报警；1--消防报警；2--门磁报警；3--开门超时报警；4--黑名单报警
        /// </summary>
        public int AlarmStatus { get; set; }

        /// <summary>
        /// 权限统计数
        /// </summary>
        public int AccessTotal { get; set; }
        /// <summary>
        /// 新权限数
        /// </summary>
        public int NewAccessTotal { get; set; }
        /// <summary>
        /// 待删除权限数
        /// </summary>
        public int DeleteAccessTotal { get; set; }

        /// <summary>
        /// 待执行的远程任务数量
        /// </summary>
        public int RemoteTaskTotal { get; set; }

        /// <summary>
        /// 是否需要清空所有人员
        /// </summary>
        public int EmptyPeople { get; set; }

        /// <summary>
        /// 是否需要读取设备参数
        /// </summary>
        public int ReadDeviceParameter { get; set; }


        /// <summary>
        /// 上传设备固件的URL
        /// </summary>
        public string UpdateSoftURL { get; set; }
        /// <summary>
        /// 固件版本号
        /// </summary>
        public string UpdateSoftVer { get; set; }
        /// <summary>
        /// 固件MD5
        /// </summary>
        public string UpdateSoftMD5 { get; set; }

        /// <summary>
        /// 设备工作参数
        /// </summary>
        public APIModel_WorkParameter WorkParameter { get; set; }

        /// <summary>
        /// 缓存上传的人员编号
        /// </summary>
        public List<DTOCacheUploadPeople> UploadPersonnelCache { get; set; }

        /// <summary>
        /// 缓存删除的人员编号
        /// </summary>
        public List<DTOCacheUploadPeople> DeletePersonnelCache { get; set; }
    }
}
